package com.kaibes.core.base.util;

public class LongUtils {

    public static boolean isNotZero(Long l) {
        return l != null && l != 0;
    }
    
    public static boolean isZero(Long l) {
        return l==null || l==0;
    }
    
    public static long getLength(String target) {
        if (target == null) {
            return -1;
        } else {
            return target.length();
        }
    }
    
    public static long getValue(String value) {
        if (value == null) {
            return -1;
        } else {
            return Long.valueOf(value);
        }
    }
}
